/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import Model.Accion;
import Principals.Main;
import org.hibernate.Query;

/**
 *
 * @author DeveloperPostgre
 */
public class AccionDAO {

    public static Accion buscarAccion(int i) {
        Main.usrSesion.session.beginTransaction();
        Query query = Main.usrSesion.session.createQuery("from Accion where id_accion = :id");
        query.setParameter("id", i);
        
        Accion accion = (Accion) query.uniqueResult();
        Main.usrSesion.session.getTransaction().commit();
        return accion;
    }
    
}
